package com.leyou.item.web;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author:yanjizhw@163.com
 * @date:2019-09-23 15:45
 * 描述: 返回 html 页面
 * @since:1.0.0
 */
@Controller
public class PageController {

    @RequestMapping("login.page")
    public String getLogin(){
        return "/login";
    }

    @RequestMapping("index.page")
    public String getIndex(@ModelAttribute("username") String username, Model model){

        model.addAttribute("username", username);

        return "/index";
    }

    @RequestMapping("category.page")
    public String getCategory(){
        return "/category";
    }

    @RequestMapping("brand.page")
    public String getBrand(){
        return "/brand";
    }

    @RequestMapping("spec.page")
    public String getSpec(){
        return "/spec";
    }

    @RequestMapping("goods.page")
    public String getGoods(){
        return "/goods";
    }

    @RequestMapping("manager.page")
    public String getManager(){
        return "/manager";
    }

    @RequestMapping("permission.page")
    public String getPermission(){
        return "/permission";
    }

    @RequestMapping("role.page")
    public String getRole(){
        return "/role";
    }
}
